<template>
  <div class="d-flex justify-content-end">
     <el-button @click="minizeWindowHandler">最小化</el-button>
     <el-button @click="maxizeWindowHandler">最大化</el-button>
     <el-button @click="closeWindow">关闭</el-button>
  </div>
  <BaseTable />
</template>

<script setup lang="ts">
import BaseTable from './components/BaseTable/index.vue'
import { createApp } from 'vue'

// 导入不进来，要在preload中把ipcRenderer放到全局中去
// const { ipcRenderer } = require('electron')

const app = createApp({})

app.component('BaseTable', BaseTable)

const minizeWindowHandler = () => {
  window.electronAPI.minimizeWin('我是渲染窗口')
}

const maxizeWindowHandler = () => {
  window.electronAPI.restoreOrMaxWin()
}

const closeWindow = () => {
  window.electronAPI.closeWindow()
}

</script>

<style lang="scss" scoped>
</style>
